@@ -291,4 +291,6 @@ h4 {
|
||
| 291 | 291 |
.spacer-top-medium { margin-top: 50px; }
|
| 292 | 292 |
.spacer-left-medium { margin-left: 50px; }
|
| 293 | 293 |
.spacer-right-medium { margin-right: 50px; }
|
| 294 |
-.spacer-bottom-medium { margin-bottom: 50px; }
|
|
| 294 |
+.spacer-bottom-medium { margin-bottom: 50px; }
|
|
| 295 |
+ |
|
| 296 |
+.align-center { margin-left: auto; margin-right: auto;}
|
@@ -87,3 +87,19 @@ |
||
| 87 | 87 |
.thumbnail-content .dashboard-role:nth-child(1){
|
| 88 | 88 |
margin-top: 2px; |
| 89 | 89 |
} |
| 90 |
+ |
|
| 91 |
+.directing-mission-actions{
|
|
| 92 |
+ border-top: @theme-border; |
|
| 93 |
+ border-bottom: @theme-border; |
|
| 94 |
+ height: 152px; |
|
| 95 |
+} |
|
| 96 |
+ |
|
| 97 |
+.directing-action {
|
|
| 98 |
+ width: 50%; |
|
| 99 |
+ text-align: center; |
|
| 100 |
+ margin-top: 10px; |
|
| 101 |
+ i {
|
|
| 102 |
+ font-size: 90px; |
|
| 103 |
+ color: #AFB4BF; |
|
| 104 |
+ } |
|
| 105 |
+} |
@@ -1,10 +1,13 @@ |
||
| 1 | 1 |
class AgentsController < ApplicationController |
| 2 | 2 |
|
| 3 |
- before_action :set_agent_dashboard, only: [:dashboard, :rewards, :received_reward, :not_received_reward] |
|
| 3 |
+ before_action :set_agent_dashboard, only: [:dashboard, :directing_missions, :rewards, :received_reward, :not_received_reward] |
|
| 4 | 4 |
|
| 5 | 5 |
def dashboard |
| 6 | 6 |
end |
| 7 | 7 |
|
| 8 |
+ def directing_missions |
|
| 9 |
+ end |
|
| 10 |
+ |
|
| 8 | 11 |
def list |
| 9 | 12 |
@users = User.all |
| 10 | 13 |
end |
@@ -4,6 +4,7 @@ |
||
| 4 | 4 |
<%= content_tag(:div, class: 'span8') do %> |
| 5 | 5 |
<%= content_tag(:ul, class: 'nav nav-tabs') do %> |
| 6 | 6 |
<%= content_tag(:li, (link_to (t 'mission.missions'), dashboard_path), class: ('active' if params[:action] == 'dashboard' )) %>
|
| 7 |
+ <%= content_tag(:li, (link_to (t 'mission.directing'), directing_missions_path), class: ('active' if params[:action] == 'directing_missions' )) %>
|
|
| 7 | 8 |
<%= content_tag(:li, (link_to (t 'mission.rewards'), user_rewards_path(view: 'recent')), class: ('active' if params[:action] == 'rewards' )) %>
|
| 8 | 9 |
<%= content_tag(:li, (link_to (t 'agent.tasks'), '#'), class: 'disabled') %> |
| 9 | 10 |
<%= content_tag(:li, (link_to (t 'agent.messages'), '#'), class: 'disabled') %> |
@@ -0,0 +1,69 @@ |
||
| 1 |
+<% # Header BG %> |
|
| 2 |
+<%= content_tag(:div, class: 'container-bg container-pre-tabs') do %> |
|
| 3 |
+ <%= content_tag(:div, class: 'container top-container container-bg') do %> |
|
| 4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
| 5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
| 6 |
+ <%= content_tag(:div, class: 'page-header') do %> |
|
| 7 |
+ <%= content_tag(:h1, (t 'agent.dashboard')) %> |
|
| 8 |
+ <% end %> |
|
| 9 |
+ <% end %> |
|
| 10 |
+ <% end %> |
|
| 11 |
+ <% # User Stats %> |
|
| 12 |
+ <%= render :partial => 'dashboard_stats', locals: {agent_missions: @agent_missions, rewards: @rewards} %>
|
|
| 13 |
+ <% end %> |
|
| 14 |
+<% end %> |
|
| 15 |
+ |
|
| 16 |
+<% # Tabs %> |
|
| 17 |
+<%= render :partial => 'dashboard_tabs' %> |
|
| 18 |
+ |
|
| 19 |
+<% # Content%> |
|
| 20 |
+<%= content_tag(:div, class: 'container') do %> |
|
| 21 |
+ <%= content_tag(:div, class: 'row') do %> |
|
| 22 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
| 23 |
+ <%= bootstrap_flash %> |
|
| 24 |
+ <%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
| 25 |
+ <% @directing_missions.each do |mission| %> |
|
| 26 |
+ |
|
| 27 |
+ <%= content_tag(:li, class: 'span4') do %> |
|
| 28 |
+ <% content_tag(:div, class: 'thumbnail') do %> |
|
| 29 |
+ <%= content_tag(:div, class: 'thumbnail-content') do%> |
|
| 30 |
+ <%= content_tag(:h4, (t 'mission.mission')+':', class: 'dashboard-role') %> |
|
| 31 |
+ <%= content_tag(:h2, link_to(mission.title, mission_path(mission))) %> |
|
| 32 |
+ <%= content_tag(:h4, (t 'agent.role')+':', class: 'dashboard-role') %> |
|
| 33 |
+ <%= content_tag(:p, (t 'mission.mission_director') ) %> |
|
| 34 |
+ |
|
| 35 |
+ <% end %> |
|
| 36 |
+ |
|
| 37 |
+ <% # Actions %> |
|
| 38 |
+ <%= content_tag(:div, class: 'directing-mission-actions centered') do %> |
|
| 39 |
+ <% if mission.status == 1 || mission.status == 2 || mission.status == nil %> |
|
| 40 |
+ <%= content_tag(:div, class: 'directing-action pull-left') do %> |
|
| 41 |
+ <%= content_tag(:i, '', class: 'icon-mission') %> |
|
| 42 |
+ <%= link_to((t 'mission.mission_editor'), mission_editor_path(mission), class: 'btn') %> |
|
| 43 |
+ <% end %> |
|
| 44 |
+ <% end %> |
|
| 45 |
+ <%= content_tag(:div, class: "directing-action #{ mission.status == 1 || mission.status == 2 || mission.status == nil ? 'pull-left' : 'align-center'}") do %>
|
|
| 46 |
+ <%= content_tag(:i, '', class: 'icon-radar') %> |
|
| 47 |
+ <%= link_to((t 'mission.mission_control'), mission_control_path(mission), class: 'btn') %> |
|
| 48 |
+ <% end %> |
|
| 49 |
+ <% end %> |
|
| 50 |
+ |
|
| 51 |
+ <% # Progress bar %> |
|
| 52 |
+ <%= content_tag(:div, class: 'thumbnail-content mission-agent-percentage') do %> |
|
| 53 |
+ <%= render :partial => 'missions/mission_percentage_bar', locals: { mission: mission, size: '' } %>
|
|
| 54 |
+ <% end %> |
|
| 55 |
+ |
|
| 56 |
+ <%= content_tag(:div, class: 'thumbnail-content mission-status-timer') do%> |
|
| 57 |
+ <%= content_tag(:div) do %> |
|
| 58 |
+ <%= mission_time_left(mission) %> |
|
| 59 |
+ <%= status(mission.status) %> |
|
| 60 |
+ <% end %> |
|
| 61 |
+ <% end %> |
|
| 62 |
+ <% end %> |
|
| 63 |
+ <% end %> |
|
| 64 |
+ |
|
| 65 |
+ <% end %> |
|
| 66 |
+ <% end %> |
|
| 67 |
+ <% end %> |
|
| 68 |
+ <% end %> |
|
| 69 |
+<% end %> |
@@ -55,6 +55,7 @@ Avalanche2::Application.routes.draw do |
||
| 55 | 55 |
|
| 56 | 56 |
# Agents |
| 57 | 57 |
get 'dashboard' => 'agents#dashboard', as: :dashboard |
| 58 |
+ get 'dashboard/directing' => 'agents#directing_missions', as: :directing_missions |
|
| 58 | 59 |
get 'agents' => 'agents#list', as: :agent_list |
| 59 | 60 |
get 'agent/:id' => 'agents#show', as: :show_agent |
| 60 | 61 |
|